<?php
/*function __autoload($class)
{
	$file =$class.".class.php";
	if(is_file($file))
	{
		require $file;
	}else
	{
		return ;
	}
}*/

function selfauto($class){
	if($file ="./admin/".$class.".class.php")
	{
		if(is_file($file))
		{
			require $file;
		}elseif ($file ="./home/".$class.".class.php") {
			require $file;
		}else{
			return ;
		}
	}
}
spl_autoload_register("selfauto");
$user = new User;
echo $user->index();
$news = new News;
echo $news->index();
